using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BReusable.StaticReflection;
using System.Diagnostics;
using BReusable.Containers;

namespace StarfleetCommanderDomain.Game
{
    public class CombatUnitContainer : EspItemContainer<CombatUnitModel>
    {
        public const string STR_AntiBallisticMissile = "Anti-Ballistic Missile";
        public const string STR_InterplanetaryBallisticMissile = "Interplanetary Ballistic Missile";

        public CombatUnitContainer(ICombatUnitCache cache, LambdaDictionary<string, CombatUnitModel> values)
            : base(values)
        {
         
            foreach (var value in values)
            {
                Debug.Assert(value.Key==STR_AntiBallisticMissile || value.Key==STR_InterplanetaryBallisticMissile
					|| cache
					.GetCombatUnitId(value.Key) > 0);
                //Guard.IsTrue(() => CombatUnitCache.Instance.GetCombatUnitId(value.Key) > 0);
            }
        }
        public bool ReadShips { get { return true; } }

        public CombatUnitModel Atlas { get { return GetItemIfExists("Atlas Class Cargo"); } }

        public CombatUnitModel Hermes { get { return GetItemIfExists("Hermes Class Probe"); } }

        public CombatUnitModel Helios { get { return GetItemIfExists("Helios Class Solar Satellite"); } }

        public CombatUnitModel Artemis { get { return GetItemIfExists("Artemis Class Fighter"); } }

        public CombatUnitModel Apollo { get { return GetItemIfExists("Apollo Class Fighter"); } }

        public CombatUnitModel Charon { get { return GetItemIfExists("Charon Class Transport"); } }

        public CombatUnitModel Hercules { get { return GetItemIfExists("Hercules Class Cargo"); } }

        public CombatUnitModel Dionysus { get { return GetItemIfExists("Dionysus Class Recycler"); } }

        public CombatUnitModel Poseidon { get { return GetItemIfExists("Poseidon Class Cruiser"); } }

        public CombatUnitModel Gaia { get { return GetItemIfExists("Gaia Class Colony Ship"); } }
        public CombatUnitModel Athena { get { return GetItemIfExists("Athena Class Battleship"); } }
        public CombatUnitModel Ares { get { return GetItemIfExists("Ares Class Bomber"); } }
        public CombatUnitModel Hades { get { return GetItemIfExists("Hades Class Battleship"); } }
        public CombatUnitModel Prometheus { get { return GetItemIfExists("Prometheus Class Destroyer"); } }

        public CombatUnitModel Zeus { get { return GetItemIfExists("Zeus Class"); } }
        public CombatUnitModel Hephaestus { get { return GetItemIfExists("Missile Battery"); } }
        public CombatUnitModel Laser { get { return GetItemIfExists("Laser Cannon"); } }
        public CombatUnitModel Pulse { get { return GetItemIfExists("Pulse Cannon"); } }
        public CombatUnitModel Particle { get { return GetItemIfExists("Particle Cannon"); } }

        public CombatUnitModel ABMissile { get { return GetItemIfExists(STR_AntiBallisticMissile); } }

        public CombatUnitModel Decoy { get { return GetItemIfExists("Decoy"); } }

        public CombatUnitModel IBMissile { get { return GetItemIfExists(STR_InterplanetaryBallisticMissile); } }

        public CombatUnitModel Gauss { get { return GetItemIfExists("Gauss Cannon"); } }

        public CombatUnitModel LargeDecoy { get { return GetItemIfExists("Large Decoy"); } }

        public CombatUnitModel Plasma { get { return GetItemIfExists("Plasma Cannon"); } }

    }
}
